<?php
class Slide extends Home_Controller{
	public function __construct(){
		parent::__construct();
		$this->load->Model(array("Mgallery"));
	}	
	
	public function index(){
		$encry = md5(base64_encode('gallery'));
		if(!$this->cache->get($encry)){
			$data['gallery'] = $this->Mgallery->getImages();
			$this->cache->write($data, $encry);
		}else{
			$data = $this->cache->get($encry);
		}
		$this->load->view("slide/index",$data);
	}
}